unit uFrmEmitentePes;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uFrmModeloPesquisa, cxGraphics, cxControls, cxLookAndFeels,
  cxLookAndFeelPainters, cxContainer, cxEdit, dxSkinsCore, dxSkinBlack, dxSkinBlue,
  dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinFoggy,
  dxSkinGlassOceans, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
  dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMoneyTwins, dxSkinOffice2007Black,
  dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
  dxSkinOffice2007Silver, dxSkinPumpkin, dxSkinSeven, dxSkinSharp, dxSkinSilver,
  dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinsDefaultPainters,
  dxSkinValentine, dxSkinXmas2008Blue, Menus, cxStyles, dxSkinscxPCPainter, cxCustomData,
  cxFilter, cxData, cxDataStorage, DB, cxDBData, cxGridLevel, cxClasses, cxGridCustomView,
  cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGrid, cxSplitter, StdCtrls,
  cxButtons, cxLabel, cxTextEdit, cxMaskEdit, cxGroupBox, ExtCtrls, ActnList, DBClient,
  cxDropDownEdit, cxPC;

type
  TfrmEmitentePes = class(TfrmModeloPesquisa)
    cdsID_EMITENTE: TIntegerField;
    cdsCNAE: TStringField;
    cdsCNPJ: TStringField;
    cdsINSC_MUNICIPAL: TStringField;
    cdsINSC_ESTADUAL: TStringField;
    cdsNOME_FANTASIA: TStringField;
    cdsRAZAO_SOCIAL: TStringField;
    cdsLOGRADOURO: TStringField;
    cdsBAIRRO: TStringField;
    cdsCOMPLEMENTO: TStringField;
    cdsNUMERO: TStringField;
    cdsUF: TStringField;
    cdsMUNICIPIO: TStringField;
    cdsCOD_MUNICIPIO: TStringField;
    cdsCOD_PAIS: TStringField;
    cdsCEP: TStringField;
    cdsPAIS: TStringField;
    cdsTELEFONE: TStringField;
    cxGrid1DBTableView1CNPJ: TcxGridDBColumn;
    cxGrid1DBTableView1NOME_FANTASIA: TcxGridDBColumn;
    cxGrid1DBTableView1RAZAO_SOCIAL: TcxGridDBColumn;
    cxGrid1DBTableView1LOGRADOURO: TcxGridDBColumn;
    cxGrid1DBTableView1BAIRRO: TcxGridDBColumn;
    cxGrid1DBTableView1COMPLEMENTO: TcxGridDBColumn;
    cxGrid1DBTableView1NUMERO: TcxGridDBColumn;
    cxGrid1DBTableView1UF: TcxGridDBColumn;
    cxGrid1DBTableView1MUNICIPIO: TcxGridDBColumn;
    cxGrid1DBTableView1CEP: TcxGridDBColumn;
    cxGrid1DBTableView1TELEFONE: TcxGridDBColumn;
    cdsINSC_ESTADUAL_ST: TStringField;
    procedure FormCreate(Sender: TObject);
    procedure cdsAfterInsert(DataSet: TDataSet);
  private
    { Private declarations }

  public
    { Public declarations }
  end;

var
  frmEmitentePes: TfrmEmitentePes;

implementation

uses uFrmEmitenteCad, uDmNf;

{$R *.dfm}

procedure TfrmEmitentePes.cdsAfterInsert(DataSet: TDataSet);
begin
  inherited;
  cdsID_EMITENTE.AsInteger:=dmNF.autoInc('CAD_EMITENTES_GEN');
end;

procedure TfrmEmitentePes.FormCreate(Sender: TObject);
begin
  FMasterField:=cdsID_EMITENTE;
  FFormCad := frmEmitenteCad;
  FFormCadClass := TfrmEmitenteCad;
  inherited;

end;

end.
